package com.woniu.service.healthSystem.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniu.mapper.healthSystem.AccountMapper;
import com.woniu.model.healthSystem.dto.AccountDto;
import com.woniu.model.healthSystem.entity.Account;
import com.woniu.service.healthSystem.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 职员表 服务实现类
 * </p>
 *
 * @author gb
 * @since 2023-10-19
 */
@Service
public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> implements IAccountService {

    @Autowired
    private AccountMapper accountMapper;

    /**
     * 查询
     */
    @Override
    public List<AccountDto> findAll() {
        return accountMapper.findAll();
    }

    /**
     * 添加
     *
     * @param account
     */
    @Override
    public int addAccount(Account account) {
        return accountMapper.addAccount(account);
    }

    /**
     * 编辑
     *
     * @param account
     */
    @Override
    public int update(Account account) {
        return accountMapper.update(account);
    }

    /**
     * 删除
     *
     * @param id
     */
    @Override
    public int deleteById(Long id) {
        return accountMapper.deleteById(id);
    }
}
